Stacker: sequential ("stacking access") storage capability#1119
Closed
c-reiter wants to merge 2 commits into
Closed
Stacker: sequential ("stacking access") storage capability#1119c-reiter wants to merge 2 commits into
Stacker: sequential ("stacking access") storage capability#1119c-reiter wants to merge 2 commits into
Conversation
Adds a `Stacker` capability for sequential/LIFO plate storage, the code counterpart to the "Stacking Access (Sequential)" category already in the storage docs. Per the design discussion in PyLabRobot#1113, this is a composable capability (wrapping a `StackerBackend`) rather than a split frontend hierarchy, and it does not touch the existing random-access `Incubator`. - `Stacker(Machine, Resource)`: holds one or more single-ended LIFO `ResourceStack` stacks plus a transfer position (the "loading tray", borrowing the incubator's term). `downstack` moves the accessible (top) plate onto the tray; `upstack` moves a plate from the tray onto a stack. Stack height/positions come from `Plate.stacking_z_height` via ResourceStack nesting. - `StackerBackend`: minimal device interface (`set_stacks`, `downstack`, `upstack`) — deliberately no door/temperature/shaking. - `StackerChatterboxBackend` for tests/demos. Intended for the Agilent BenchCel and HighRes MicroServe; migrating the BenchCel onto this capability is a follow-up. Serialization round-trip is left for a follow-up (needs ResourceStack serialization support). Refs PyLabRobot#1113. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Maps the documented "Random access" / "Stacking access (sequential)" retrieval patterns to the `Incubator` and new `Stacker` capabilities, and adds a `Stacker` section (loading tray, LIFO `downstack`/`upstack`, ResourceStack nesting) with a runnable `StackerChatterboxBackend` example.
Member
|
high level: interface looks good overall it would be good to target v1 with this and make Stacker a |
Contributor
Author
|
Superseded by #1142, which implements this as a v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
Stackercapability for sequential / LIFO plate storage - the code counterpart to the "Stacking Access (Sequential)" category that's already described in the storage user guide but had no implementation (today every storage device is forced through the random-accessIncubator).Design per the discussion in #1113. @rickwierenga preferred a composable capability over a split-frontend hierarchy, with the transfer position as part of the stacker, so this:
StackerBackend(no sharedStorageBackendbase, no changes toIncubator);What's here
Stacker(Machine, Resource)- holds one or more single-ended LIFO stacks (each aResourceStack(direction="z")) plus a loading tray.downstack(stack)→ moves the accessible (top) plate onto the loading tray and returns it.upstack(stack, plate=None)→ moves a plate from the loading tray onto a stack (defaults to whatever is on the tray).ResourceStack(only the top plate is accessible); stack height/positions come fromPlate.stacking_z_heightvia the nesting added inResourceStack: nest stacked plates byPlate.stacking_z_height#1112.get_accessible_plate,get_stack_by_plate_name,summary.StackerBackend— minimal device interface:set_stacks,downstack,upstack. Deliberately no door/temperature/shaking (a stacker is not an incubator).StackerChatterboxBackend— no-op backend for tests/demos.Intended consumers
The Agilent BenchCel (#1109) and the HighRes MicroServe. Migrating the BenchCel from its current faked-
PlateCarrierIncubatormodel onto this capability is a planned follow-up.Notes / follow-ups
ResourceStackserialization support (ResourceStack.__init__takesdirection, notsize_*, so it doesn't round-trip through the generic path).Stacker.serializeworks;Stacker.deserializeraisesNotImplementedErrorfor now (and resolves theMachine/ResourceMRO ambiguity).